<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    div{
        width: 100px;
        height:100px;
    }
    .g{
        background-color: green;
        float:left;
    }
    .r{
        background-color: red;
        float: right;
    }
    .y{
        background-color: yellow;
        float: right;
    }
    .g1{
        background-color: green;
        float:left;
        width:500px;
        height:500px;
    }
    .r1{
        background-color: red;
        float: right;
        width:300px;
        height:300px;
    }
    .y1{
        background-color: yellow;
        float: right;
        width:200px;
        height:200px;
    }
</style>
</head>
<body>
    <div class="g"></div>
    <div class="r"></div>
    <div class="y"></div>
    <!-- <div class="g1"></div>
    <div class="r1"></div>
    <div class="y1"></div> -->
</body>
</html>